package br.com.advance.automacao.services.dto;

import java.math.BigDecimal;
import java.text.DecimalFormat;

public class EficienciaCLP {
	private String nome;
	private Integer gef;
	private Integer displays;
	private Integer rpm;
	private Integer mtbf;

	public EficienciaCLP() {

	}

	public EficienciaCLP(String nome, Integer gef, Integer displays, Integer rpm,
			Integer mtbf) {
		this.nome = nome;
		this.gef = gef;
		this.displays = displays;
		this.rpm = rpm;
		this.mtbf = mtbf;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public Integer getGef() {
		return gef;
	}

	public void setGef(Integer gef) {
		this.gef = gef;
	}

	public Integer getDisplays() {
		return displays;
	}

	public void setDisplays(Integer displays) {
		this.displays = displays;
	}

	public Integer getRpm() {
		return rpm;
	}

	public void setRpm(Integer rpm) {
		this.rpm = rpm;
	}

	public Integer getMtbf() {
		return mtbf;
	}

	public void setMtbf(Integer mtbf) {
		this.mtbf = mtbf;
	}
	
	public String getMtbfFormat() {
		if(new Integer(0).equals(mtbf)) {
			return "N/A";
		}
		DecimalFormat df = new DecimalFormat("#,##0.00");
		return df.format(new BigDecimal(mtbf.toString()).divide(new BigDecimal("100")).doubleValue());
	}
}
